home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / prsht.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  12.5 KB  |  434 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * prsht.h - - Interface for the Windows Property Sheet Pages                  *
  4. *                                                                             *
  5. * Version 1.0                                                                 *
  6. *                                                                             *
  7. * Copyright (c) 1991-1998, Microsoft Corp.      All rights reserved.          *
  8. *                                                                             *
  9. \*****************************************************************************/
  10.  
  11. #ifndef _PRSHT_H_
  12. #define _PRSHT_H_
  13.  
  14. //
  15. // Define API decoration for direct importing of DLL references.
  16. //
  17. #ifndef WINCOMMCTRLAPI
  18. #if !defined(_COMCTL32_) && defined(_WIN32)
  19. #ifdef _WIN32_WCE_EMULATION
  20. #define WINCOMMCTRLAPI
  21. #else
  22. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  23. #endif
  24. #else
  25. #define WINCOMMCTRLAPI
  26. #endif
  27. #endif // WINCOMMCTRLAPI
  28.  
  29. //
  30. // For compilers that don't support nameless unions
  31. //
  32. #ifndef DUMMYUNIONNAME
  33. #ifdef NONAMELESSUNION
  34. #define DUMMYUNIONNAME   u
  35. #define DUMMYUNIONNAME2  u2
  36. #define DUMMYUNIONNAME3  u3
  37. #else
  38. #define DUMMYUNIONNAME
  39. #define DUMMYUNIONNAME2
  40. #define DUMMYUNIONNAME3
  41. #endif
  42. #endif // DUMMYUNIONNAME
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48.  
  49. #ifndef SNDMSG
  50. #ifdef __cplusplus
  51. #define SNDMSG ::SendMessage
  52. #else
  53. #define SNDMSG SendMessage
  54. #endif
  55. #endif // ifndef SNDMSG
  56.  
  57. #define MAXPROPPAGES            100
  58.  
  59. struct _PSP;
  60. typedef struct _PSP FAR* HPROPSHEETPAGE;
  61.  
  62. #ifndef MIDL_PASS
  63. struct _PROPSHEETPAGEA;
  64. struct _PROPSHEETPAGEW;
  65. #endif
  66.  
  67. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEA FAR *ppsp);
  68. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW FAR *ppsp);
  69.  
  70. #ifdef UNICODE
  71. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKW
  72. #else
  73. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKA
  74. #endif
  75.  
  76. #define PSP_DEFAULT             0x0000
  77. #define PSP_DLGINDIRECT         0x0001
  78. #define PSP_USEHICON            0x0002
  79. #define PSP_USEICONID           0x0004
  80. #define PSP_USETITLE            0x0008
  81. #define PSP_RTLREADING          0x0010
  82.  
  83. #define PSP_HASHELP             0x0020
  84. #define PSP_USEREFPARENT        0x0040
  85. #define PSP_USECALLBACK         0x0080
  86. #define PSP_PREMATURE           0x0400
  87.  
  88.  
  89. #define PSPCB_RELEASE           1
  90. #define PSPCB_CREATE            2
  91.  
  92.  
  93. typedef struct _PROPSHEETPAGEA {
  94.         DWORD           dwSize;
  95.         DWORD           dwFlags;
  96.         HINSTANCE       hInstance;
  97.         union {
  98.             LPCSTR          pszTemplate;
  99. #ifdef _WIN32
  100.             LPCDLGTEMPLATE  pResource;
  101. #else
  102.             const VOID FAR *pResource;
  103. #endif
  104.         } DUMMYUNIONNAME;
  105.         union {
  106.             HICON       hIcon;
  107.             LPCSTR      pszIcon;
  108.         } DUMMYUNIONNAME2;
  109.         LPCSTR          pszTitle;
  110.         DLGPROC         pfnDlgProc;
  111.         LPARAM          lParam;
  112.         LPFNPSPCALLBACKA pfnCallback;
  113.         UINT FAR * pcRefParent;
  114. } PROPSHEETPAGEA, FAR *LPPROPSHEETPAGEA;
  115. typedef const PROPSHEETPAGEA FAR *LPCPROPSHEETPAGEA;
  116.  
  117. typedef struct _PROPSHEETPAGEW {
  118.         DWORD           dwSize;
  119.         DWORD           dwFlags;
  120.         HINSTANCE       hInstance;
  121.         union {
  122.             LPCWSTR          pszTemplate;
  123. #ifdef _WIN32
  124.             LPCDLGTEMPLATE  pResource;
  125. #else
  126.             const VOID FAR *pResource;
  127. #endif
  128.         }DUMMYUNIONNAME;
  129.         union {
  130.             HICON       hIcon;
  131.             LPCWSTR      pszIcon;
  132.         }DUMMYUNIONNAME2;
  133.         LPCWSTR          pszTitle;
  134.         DLGPROC         pfnDlgProc;
  135.         LPARAM          lParam;
  136.         LPFNPSPCALLBACKW pfnCallback;
  137.         UINT FAR * pcRefParent;
  138. } PROPSHEETPAGEW, FAR *LPPROPSHEETPAGEW;
  139. typedef const PROPSHEETPAGEW FAR *LPCPROPSHEETPAGEW;
  140.  
  141. #ifdef UNICODE
  142. #define PROPSHEETPAGE           PROPSHEETPAGEW
  143. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEW
  144. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEW
  145. #else
  146. #define PROPSHEETPAGE           PROPSHEETPAGEA
  147. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEA
  148. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEA
  149. #endif
  150.  
  151.  
  152. #define PSH_DEFAULT             0x0000
  153. #define PSH_PROPTITLE           0x0001
  154. #define PSH_USEHICON            0x0002
  155. #define PSH_USEICONID           0x0004
  156. #define PSH_PROPSHEETPAGE       0x0008
  157. #define PSH_WIZARDHASFINISH     0x0010
  158. #define PSH_WIZARD              0x0020
  159. #define PSH_USEPSTARTPAGE       0x0040
  160. #define PSH_NOAPPLYNOW          0x0080
  161. #define PSH_USECALLBACK         0x0100
  162. #define PSH_HASHELP             0x0200
  163. #define PSH_MODELESS            0x0400
  164. #define PSH_RTLREADING          0x0800
  165. #define PSH_WIZARDCONTEXTHELP   0x1000
  166.  
  167. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  168.  
  169. typedef struct _PROPSHEETHEADERA {
  170.         DWORD           dwSize;
  171.         DWORD           dwFlags;
  172.         HWND            hwndParent;
  173.         HINSTANCE       hInstance;
  174.         union {
  175.             HICON       hIcon;
  176.             LPCSTR      pszIcon;
  177.         }DUMMYUNIONNAME;
  178.         LPCSTR          pszCaption;
  179.  
  180.  
  181.         UINT            nPages;
  182.         union {
  183.             UINT        nStartPage;
  184.             LPCSTR      pStartPage;
  185.         }DUMMYUNIONNAME2;
  186.         union {
  187.             LPCPROPSHEETPAGEA ppsp;
  188.             HPROPSHEETPAGE FAR *phpage;
  189.         }DUMMYUNIONNAME3;
  190.         PFNPROPSHEETCALLBACK pfnCallback;
  191. } PROPSHEETHEADERA, FAR *LPPROPSHEETHEADERA;
  192. typedef const PROPSHEETHEADERA FAR *LPCPROPSHEETHEADERA;
  193.  
  194. typedef struct _PROPSHEETHEADERW {
  195.         DWORD           dwSize;
  196.         DWORD           dwFlags;
  197.         HWND            hwndParent;
  198.         HINSTANCE       hInstance;
  199.         union {
  200.             HICON       hIcon;
  201.             LPCWSTR     pszIcon;
  202.         }DUMMYUNIONNAME;
  203.         LPCWSTR         pszCaption;
  204.  
  205.  
  206.         UINT            nPages;
  207.         union {
  208.             UINT        nStartPage;
  209.             LPCWSTR     pStartPage;
  210.         }DUMMYUNIONNAME2;
  211.         union {
  212.             LPCPROPSHEETPAGEW ppsp;
  213.             HPROPSHEETPAGE FAR *phpage;
  214.         }DUMMYUNIONNAME3;
  215.         PFNPROPSHEETCALLBACK pfnCallback;
  216. } PROPSHEETHEADERW, FAR *LPPROPSHEETHEADERW;
  217. typedef const PROPSHEETHEADERW FAR *LPCPROPSHEETHEADERW;
  218.  
  219. #ifdef UNICODE
  220. #define PROPSHEETHEADER         PROPSHEETHEADERW
  221. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERW
  222. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERW
  223. #else
  224. #define PROPSHEETHEADER         PROPSHEETHEADERA
  225. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERA
  226. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERA
  227. #endif
  228.  
  229.  
  230. #define PSCB_INITIALIZED  1
  231. #define PSCB_PRECREATE    2
  232.  
  233. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
  234. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
  235. WINCOMMCTRLAPI BOOL           WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  236. WINCOMMCTRLAPI int            WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  237. WINCOMMCTRLAPI int            WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  238.  
  239. #ifdef UNICODE
  240. #define CreatePropertySheetPage  CreatePropertySheetPageW
  241. #define PropertySheet            PropertySheetW
  242. #else
  243. #define CreatePropertySheetPage  CreatePropertySheetPageA
  244. #define PropertySheet            PropertySheetA
  245. #endif
  246.  
  247.  
  248.  
  249. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  250. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  251.  
  252.  
  253. typedef struct _PSHNOTIFY
  254. {
  255.     NMHDR hdr;
  256.     LPARAM lParam;
  257. } PSHNOTIFY, FAR *LPPSHNOTIFY;
  258.  
  259.  
  260. #define PSN_FIRST               (0U-200U)
  261. #define PSN_LAST                (0U-299U)
  262.  
  263.  
  264. #define PSN_SETACTIVE           (PSN_FIRST-0)
  265. #define PSN_KILLACTIVE          (PSN_FIRST-1)
  266. // #define PSN_VALIDATE            (PSN_FIRST-1)
  267. #define PSN_APPLY               (PSN_FIRST-2)
  268. #define PSN_RESET               (PSN_FIRST-3)
  269. // #define PSN_CANCEL              (PSN_FIRST-3)
  270. #define PSN_HELP                (PSN_FIRST-5)
  271. #define PSN_WIZBACK             (PSN_FIRST-6)
  272. #define PSN_WIZNEXT             (PSN_FIRST-7)
  273. #define PSN_WIZFINISH           (PSN_FIRST-8)
  274. #define PSN_QUERYCANCEL         (PSN_FIRST-9)
  275.  
  276. #define PSNRET_NOERROR              0
  277. #define PSNRET_INVALID              1
  278. #define PSNRET_INVALID_NOCHANGEPAGE 2
  279.  
  280.  
  281. #define PSM_SETCURSEL           (WM_USER + 101)
  282. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  283.         SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  284.  
  285.  
  286. #define PSM_REMOVEPAGE          (WM_USER + 102)
  287. #define PropSheet_RemovePage(hDlg, index, hpage) \
  288.         SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  289.  
  290.  
  291. #define PSM_ADDPAGE             (WM_USER + 103)
  292. #define PropSheet_AddPage(hDlg, hpage) \
  293.         SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  294.  
  295.  
  296. #define PSM_CHANGED             (WM_USER + 104)
  297. #define PropSheet_Changed(hDlg, hwnd) \
  298.         SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  299.  
  300.  
  301. #define PSM_RESTARTWINDOWS      (WM_USER + 105)
  302. #define PropSheet_RestartWindows(hDlg) \
  303.         SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  304.  
  305.  
  306. #define PSM_REBOOTSYSTEM        (WM_USER + 106)
  307. #define PropSheet_RebootSystem(hDlg) \
  308.         SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  309.  
  310.  
  311. #define PSM_CANCELTOCLOSE       (WM_USER + 107)
  312. #define PropSheet_CancelToClose(hDlg) \
  313.         PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  314.  
  315.  
  316. #define PSM_QUERYSIBLINGS       (WM_USER + 108)
  317. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  318.         SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  319.  
  320.  
  321. #define PSM_UNCHANGED           (WM_USER + 109)
  322. #define PropSheet_UnChanged(hDlg, hwnd) \
  323.         SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  324.  
  325.  
  326. #define PSM_APPLY               (WM_USER + 110)
  327. #define PropSheet_Apply(hDlg) \
  328.         SNDMSG(hDlg, PSM_APPLY, 0, 0L)
  329.  
  330.  
  331. #define PSM_SETTITLEA           (WM_USER + 111)
  332. #define PSM_SETTITLEW           (WM_USER + 120)
  333.  
  334. #ifdef UNICODE
  335. #define PSM_SETTITLE            PSM_SETTITLEW
  336. #else
  337. #define PSM_SETTITLE            PSM_SETTITLEA
  338. #endif
  339.  
  340. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  341.         SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
  342.  
  343.  
  344. #define PSM_SETWIZBUTTONS       (WM_USER + 112)
  345. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  346.         PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  347.  
  348.  
  349.  
  350. #define PSWIZB_BACK             0x00000001
  351. #define PSWIZB_NEXT             0x00000002
  352. #define PSWIZB_FINISH           0x00000004
  353. #define PSWIZB_DISABLEDFINISH   0x00000008
  354.  
  355.  
  356. #define PSM_PRESSBUTTON         (WM_USER + 113)
  357. #define PropSheet_PressButton(hDlg, iButton) \
  358.         PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  359.  
  360.  
  361. #define PSBTN_BACK              0
  362. #define PSBTN_NEXT              1
  363. #define PSBTN_FINISH            2
  364. #define PSBTN_OK                3
  365. #define PSBTN_APPLYNOW          4
  366. #define PSBTN_CANCEL            5
  367. #define PSBTN_HELP              6
  368. #define PSBTN_MAX               6
  369.  
  370.  
  371.  
  372. #define PSM_SETCURSELID         (WM_USER + 114)
  373. #define PropSheet_SetCurSelByID(hDlg, id) \
  374.         SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  375.  
  376.  
  377. #define PSM_SETFINISHTEXTA      (WM_USER + 115)
  378. #define PSM_SETFINISHTEXTW      (WM_USER + 121)
  379.  
  380. #ifdef UNICODE
  381. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTW
  382. #else
  383. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTA
  384. #endif
  385.  
  386. #define PropSheet_SetFinishText(hDlg, lpszText) \
  387.         SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  388.  
  389.  
  390. #define PSM_GETTABCONTROL       (WM_USER + 116)
  391. #define PropSheet_GetTabControl(hDlg) \
  392.         (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
  393.  
  394. #define PSM_ISDIALOGMESSAGE     (WM_USER + 117)
  395. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  396.         (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  397.  
  398. #define PSM_GETCURRENTPAGEHWND  (WM_USER + 118)
  399. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  400.         (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  401.  
  402. #define ID_PSRESTARTWINDOWS     0x2
  403. #define ID_PSREBOOTSYSTEM       (ID_PSRESTARTWINDOWS | 0x1)
  404.  
  405.  
  406. #define WIZ_CXDLG               276
  407. #define WIZ_CYDLG               140
  408.  
  409. #define WIZ_CXBMP               80
  410.  
  411. #define WIZ_BODYX               92
  412. #define WIZ_BODYCX              184
  413.  
  414. #define PROP_SM_CXDLG           212
  415. #define PROP_SM_CYDLG           188
  416.  
  417. #define PROP_MED_CXDLG          227
  418. #define PROP_MED_CYDLG          215
  419.  
  420. #define PROP_LG_CXDLG           252
  421. #define PROP_LG_CYDLG           218
  422.  
  423.  
  424.  
  425. #ifdef __cplusplus
  426. }
  427. #endif
  428.  
  429. #ifdef WINCEOEM
  430. #include <pprsht.h>     // internal defines 
  431. #endif
  432.  
  433. #endif  // _PRSHT_H_
  434.